#include <bits/stdc++.h>

#include <vector>

using namespace std;

void ShellSort(vector<int> &nums) {
    //write ur code here.
    int gap, i, j, len = nums.size();
    for (gap = len >> 1; gap > 0; gap >>= 1) {
        for (i = gap; i < len; i++) {
            for (j = i; j >= gap && nums[j-gap] > nums[j]; j -= gap) { swap(nums[j - gap],nums[j]); }
        }
    }
}

#include "../tools.h"


int main() {
    ShellSort(nums1);
    ShellSort(nums2);
    print(nums1);
    print(nums2);
    //system("pause");
    return 0;
}
